#pragma once

#include "Application.h"
#include "LoadingController.h"
#include "LoadingView.h"
#include "SleepTask.h"
#include "driver/gpio.h"

#define LOADING_TASK "loading_task"
#define GPIO_INPUT_PIN_SEL  ((1ULL<<GPIO_INPUT_IO_0) | (1ULL<<GPIO_INPUT_IO_1))

void buttonPressed();
void buttonReleased();

class Loading : public Application
{
private:
	LoadingController* controller;
	LoadingView* view;
public:
	Loading() : Application(LOADING_TASK, true)
    {
        view = new LoadingView();
        controller = new LoadingController(this, view);
    };
	virtual void execute();
	virtual void init();
	virtual void suspend() {};
	virtual void active();
    ~Loading()
    {
        delete controller;
        delete view;
    };
};

